package gamehistory.utils.computation;

import edu.neu.ccs.evergreen.ir.Relation;

public class Computations {

	public static final int ARITY = 3;
	
	public static double getBreakEvenPrice(int relationNumber) {
		Relation relation 		      = new Relation(ARITY, relationNumber);
		Polynomial relationPolynomial = RelationPolynomialFactory.retrievePolynomialForRelation(relation);
		return relationPolynomial.getBreakEven();		
	}

    public static double getMaxBias(int relationNumber) {
    	Relation relation     = new Relation(Computations.ARITY, relationNumber);
    	Polynomial polynomial = RelationPolynomialFactory.retrievePolynomialForRelation(relation);
    	return polynomial.differentiate().retrieveMaximumPValue();
    }
	
}
